﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Entities;
using Context;
using System.Security.Permissions;


namespace WCF_ListenMusic.Services.Module_Message.User
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMessageService" in both code and config file together.
    [ServiceContract]
    public interface IMessageService
    {
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand,Role="wcfuser")]
        bool AddMessage(Message message);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand,Role="wcfuser")]
        bool AddMessageRe(MessageRecipient messageRe);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "wcfuser")]
        List<VW_Message> LoadMessageByUser(string username,string type);
    }
}
